package com.hirain.observerjava;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by caicf on 2016/8/17.
 */
public class JobSeeker implements Observer {

    private  String seekerName;

    public JobSeeker(String name) {
        this.seekerName=name;
    }

    @Override
    public void update(Observable o, Object arg) {
        Job job= (Job) arg;
        System.out.println(seekerName+"接受到新的面试邀约:"+job.getJobName());
        for (Job job1 : ((Hunter)o).getJobs()) {
            System.out.println("====>>> "+job1.getJobName());
        }
    }
}
